<%--
  Created by IntelliJ IDEA.
  User: asus
  Date: 2019/12/16
  Time: 17:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    String userName="";
    String passWord="";
  // String []isUserCookie=request.getParameterValues("isUserCookie");
    Cookie[] cookie=request.getCookies();
   if(cookie!=null&&cookie.length>0){

       for (Cookie c:cookie){
           if(c.getName().equals("userName")){
               userName=c.getValue();
           }
           if(c.getName().equals("passWord")){
               passWord=c.getValue();
           }

       }
   }

%>


<form method="post" action="doLogin.jsp">
    <table>
        <tr>
            <td>用户名:</td>
            <td><input type="text" name="userName" value="<%=userName%>"> </td>
        </tr>

        <tr>
            <td>密码:</td>
            <td><input type="password" name="passWord" value="<%=passWord%>"></td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="checkbox" name="isUserCookie" value="check" checked>十天类记住我的账号和密码

            </td>

        </tr>
        <tr>
            <td colspan="2">
                <input type="submit" name="submit" value="登录">

            </td>
        </tr>


    </table>


</form>
</body>
</html>
